package com.atguigu.gmall.Service;

import com.atguigu.gmall.entity.OrderInfo;
import com.atguigu.gmall.enums.ProcessStatus;
import com.baomidou.mybatisplus.extension.service.IService;

import javax.servlet.http.HttpServletRequest;
import java.util.List;
import java.util.Map;

public interface OrderInfoService extends IService<OrderInfo> {

    Map<String, Object> confirmOrder(HttpServletRequest request);

    String getTradeNo(String userId);

    boolean checkTradeNo(String userId, String tradeNo);

    List<String> checkStockAndPrice(OrderInfo orderInfo, String userId);

    void deleteTradeNo(String userId);

    Long saveOrderInfoAndDetail(OrderInfo orderInfo);

    void updateOrderStatus(Long id, ProcessStatus processStatus);

    OrderInfo findOrderById(Long orderId);

    List<OrderInfo> splitOrder(Long orderId, String wareHouseIdSkuIdJson);

    Map<String, Object> assembWareHouseData(OrderInfo orderInfo);
}
